<%--
  Created by IntelliJ IDEA.
  User: zyp
  Date: 2021/12/14
  Time: 15:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%--
    文件上传三要素
    1:表单提交必须是post
    2:表单的enctype属性必须为multipart/form-data
    3:表单中不行有文件上传项
--%>
<form method="post" enctype="multipart/form-data" action="${pageContext.request.contextPath}/upload">
    <input type="file" name="upload"><br/>
    <input type="text" name="name">
    <input type="test" name="password">
    <input type="submit" value="文件上传">
    <img src="/upload/8844c738180c4618bb8a7b31e3d7c285_琦玉.jpg"/>
</form>

</body>
</html>
